package com.zznj.xzjc.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zznj.xzjc.R;
import com.zznj.xzjc.utils.FileUtils;

import java.util.List;
import java.util.Map;

/**
 * 描述：适配器
 */
public class WenShuListAdapter extends BaseQuickAdapter<Map<String,String>, BaseViewHolder> {

    public WenShuListAdapter(int layoutResId, @Nullable List<Map<String,String>> data) {
        super(layoutResId, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, Map<String,String> item) {
        helper.setText(R.id.tv_title,item.get("name"));
        ImageView picImg = helper.getView(R.id.picImg);
        picImg.setImageResource(FileUtils.getIcon(item.get("name")));
    }
}
